Skip to content

[RTE] Fix floating toolbar position in shadow DOM#3074

Open
cpoftea wants to merge 1 commit intoepam:developfrom
cpoftea:floating-toolbar
Open

[RTE] Fix floating toolbar position in shadow DOM#3074
cpoftea wants to merge 1 commit intoepam:developfrom
cpoftea:floating-toolbar

Conversation

@cpoftea
Copy link
Copy Markdown
Collaborator

@cpoftea cpoftea commented Mar 25, 2026

Description:

Plate’s toDOMRange is used to place the floating toolbar so it stays correct in shadow DOM; shadow-selection helpers were removed from the toolbar path, and FloatingToolbar no longer needs editor passed from callers.

Demo with fix applied:

compressO-gX1EGP_sXqpr3IoacKBgg.mp4

Issue link: #3073

QA notes:

Important to note, that RTE in shadow DOM at Safari is buggy by itself (probably because of outdated PlateJS @udecode/* deps), so this fix does not make it worse

* Removed `SelectionUtils` from `helpers` (shadow selection helpers no longer used for toolbar placement)
* Updated `PositionedToolbar`: positioned the floating toolbar using Plate `toDOMRange`; removed the obsolete props & funcs; added a note about Safari in Shadow DOM and `useEventEditorSelectors`
* Updated `Toolbars` and `tablePlugin`: stopped passing `editor` into `FloatingToolbar`
@cpoftea cpoftea requested review from JuliaMV, MSt1ch and i-runets March 25, 2026 22:40
@github-actions
Copy link
Copy Markdown

Generated by: track-bundle-size
Generated at: Wed, 25 Mar 2026 22:46:36 GMT
Bundle size diff (in kBytes). Not gzipped. Both CSS & JS included.
Baseline: v6.3.1 (2025-12-03)
CI Status: ok

Module Baseline Size
(v6.3.1)
Size Diff Within
Threshold
Threshold
(min - max)
templateApp 693.09 682.58 -10.5
js:-6.79
css:-3.71
🆗 623.78 - 762.39
@epam/app 5586.96 5539.76 -47.19
js:-46.2
css:-0.99
🆗 5028.26 - 6145.65
@epam/electric 5.04 5.04 0
js:0
css:0
🆗 4.53 - 5.54
@epam/promo 55.61 55.57 -0.05
js:0
css:-0.05
🆗 50.05 - 61.17
@epam/uui-extra 0.21 0.21 0
js:0
css:0
🆗 0.19 - 0.23
@epam/loveship 92.81 96.26 +3.45
js:+3.48
css:-0.03
🆗 83.53 - 102.09
@epam/uui-components 257.49 259.19 +1.69
js:+0.71
css:+0.99
🆗 231.75 - 283.25
@epam/uui-core 324.75 329.08 +4.33
js:+4.33
css:0
🆗 292.27 - 357.23
@epam/uui-db 41.63 41.72 +0.08
js:+0.08
css:0
🆗 37.47 - 45.8
@epam/uui-docs 181.03 194.77 +13.75
js:+13.75
css:0
🆗 162.92 - 199.13
@epam/uui-editor 174.1 172.49 -1.61
js:-1.61
css:0
🆗 156.69 - 191.51
@epam/uui-timeline 75.5 75.5 +0
js:0
css:+0
🆗 67.95 - 83.05
@epam/uui 527.51 546.55 +19.05
js:+3.35
css:+15.69
🆗 474.76 - 580.26
new sizes (raw)

To set the sizes as a new baseline, you can copy/paste next content to the uui-build/config/bundleSizeBaseLine.json and commit the file.

{
  "version": "6.4.3",
  "timestamp": "2026-03-25",
  "sizes": {
    "templateApp": {
      "css": 253670,
      "js": 445299
    },
    "@epam/app": {
      "css": 719497,
      "js": 4953220
    },
    "@epam/electric": {
      "css": 2275,
      "js": 2883
    },
    "@epam/promo": {
      "css": 47756,
      "js": 9145
    },
    "@epam/uui-extra": {
      "css": 0,
      "js": 213
    },
    "@epam/loveship": {
      "css": 55348,
      "js": 43225
    },
    "@epam/uui-components": {
      "css": 24608,
      "js": 240799
    },
    "@epam/uui-core": {
      "css": 0,
      "js": 336983
    },
    "@epam/uui-db": {
      "css": 0,
      "js": 42718
    },
    "@epam/uui-docs": {
      "css": 2152,
      "js": 197291
    },
    "@epam/uui-editor": {
      "css": 12952,
      "js": 163675
    },
    "@epam/uui-timeline": {
      "css": 2203,
      "js": 75109
    },
    "@epam/uui": {
      "css": 214809,
      "js": 344864
    }
  }
}

Generated by: generate-components-api
CI Status: ok

Total amount of exported types/props without JSDoc comments

Amount
Types 337 (+0) 🆗
Props 220 (+0) 🆗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants